home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Networking / TPIFile1.0b1 / TPIFile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-09  |  1.3 KB  |  48 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        TPIFile.h
  3.  
  4.     Contains:    Interface to the TPI Module to access File Manager files.
  5.                 Technology demonstration only!
  6.  
  7.     Written by:    Quinn "The Eskimo!"
  8.  
  9.     Copyright:    © 1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.     Change History (most recent first):
  12.  
  13.     You may incorporate this sample code into your applications without
  14.     restriction, though the sample code has been provided "AS IS" and the
  15.     responsibility for its operation is 100% yours.  However, what you are
  16.     not permitted to do is to redistribute the source as "DSC Sample Code"
  17.     after having made changes. If you're going to re-distribute the source,
  18.     we require that you make it clear in the source that the code was
  19.     descended from Apple Sample Code, but that you've made changes.
  20. */
  21.  
  22. #include <OpenTransport.h>
  23.  
  24. enum {
  25.     AF_FILESPEC = 666            // FSSpec
  26. };
  27.  
  28. struct FileSpecAddress {
  29.     OTAddressType    fAddressType;        // Use AF_FILESPEC to denote this format.
  30.     FSSpec            fss;
  31. };
  32. typedef struct FileSpecAddress FileSpecAddress, *FileSpecAddressPtr;
  33.  
  34. struct TPIFilePortInfoRecord {
  35.     OSType         magic1;
  36.     OTPortRef    portRef;
  37.     OSType         magic2;
  38. };
  39. typedef struct TPIFilePortInfoRecord TPIFilePortInfoRecord, *TPIFilePortInfoRecordPtr;
  40.  
  41. enum {
  42.     kTPIFilePerStreamDataMagic = 'ESK0',
  43.     kTPIFilePortInfoMagic1 = 'ESK1',
  44.     kTPIFilePortInfoMagic2 = 'ESK2'
  45. };
  46.  
  47. #define kTPIFilePortName "TPIFile"
  48.